<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>栏目列表</title>
	<hdjs/>
	<script type="text/javascript" src='__CONTROLLER_VIEW__/Js/js.js'></script>
</head>
<body>
<div class="warp">
	<div class="menu_list">
		<ul>
			<li><a href="{|U:'add'}">添加栏目</a></li>
			<li><a href="{|U:'updateCache'}">更新缓存</a></li>
			<li>
				<select name="pid" style="text-align:center;" onchange="changeCategory(this)">
					<option value="0">**选择栏目**</option>
				<list from='$topCategory' name='$c'>
					<option value="{$c.cid}" <if value="{$c.cid}==Q('pid')">selected=''</if>>{$c.cat_name}</option>
				</list>
				</select>
			</li>
		</ul>
	</div>
	<table class="table2">
		<thead>
			<td class="w100">CID</td>
			<td>栏目名称</td>
			<td>显示</td>
			<td class="w100">操作</td>
		</thead>
		<tbody>
		<list from='$category' name='$c'>
			<tr>
				<td>{$c.cid}</td>
				<td>{$c._name}</td>
				<td>{$c.is_show_text}</td>
				<td>
					<a href="{|U:'edit',array('cid'=>$c['cid'])}">编辑</a> |
					<a href="{|U:'del',array('cid'=>$c['cid'])}" onclick="return confirm('子栏目也将一起删除')">删除</a>
				</td>
			</tr>
		</list>
		</tbody>
	</table>
	<div class="page" style="text-align:right">
		{$page}
	</div>
	
</div>
</body>
</html>